package com.customer.controller;

import com.customer.service.OperLogService;
import com.nameless.entity.IntegrationHistory;
import com.nameless.entity.OperLog;
import com.nameless.vo.IntegrationHistoryVo;
import com.nameless.vo.OperLogVo;
import com.nameless.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author WHZ
 * @date 2023年02月28日 14:17
 */
@RestController
@RequestMapping("/client/opg/controller")
public class OperLogController {
    @Autowired
    private OperLogService operLogService;

    /**
     * 分页，模糊查询
     * @param integrationHistoryVo
     * @return
     */
    @PostMapping("/list")
    public Result<List<IntegrationHistory>> list(@RequestBody IntegrationHistoryVo integrationHistoryVo){
        return operLogService.findAll(integrationHistoryVo);
    }

    /**
     * 删除
     * @param operId
     * @return
     */
    @DeleteMapping("delete")
    public Result delete(Integer operId) {
        return operLogService.del(operId);
    }
}
